package com.hzncc.flowable_diboot.payment.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import com.hzncc.flowable_diboot.payment.entity.PaymentRegister;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 回款登记 VO定义
* @author MyName
* @version 1.0
* @date 2024-10-17
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class PaymentRegisterListVO extends PaymentRegister  {

    private static final long serialVersionUID = 1847547700150581477L;

    /**
     * SAP客户名称
     */
    @BindField(entity = SapCustomer.class,field = "name",condition = "this.sap_customer_id = id")
    private String sapCustomerName;
    
    /**
     * 传阅
     */
    @BindFieldList(entity = IamUser.class,field = "realname",condition = "this.copy_read = id", splitBy = ",")
    private String copyReadName;

    /**
    * 回款类别 关联字典选项
    */
    @BindDict(
    type = "paymentCategory",
    field = "category"
    )
    private LabelValue categoryLabel;

    /**
    * 回款类型 关联字典选项
    */
    @BindDict(
    type = "paymentType",
    field = "type"
    )
    private LabelValue typeLabel;

    /**
    * 回款状态 关联字典选项
    */
    @BindDict(
    type = "paymentStatus",
    field = "status"
    )
    private LabelValue statusLabel;

    /**
     * 公司代码 关联字典选项
     */
    @BindField(
            entity = IamTenant.class,
            field = "oaNum",
            condition = "this.tenant_id = id"
    )
    private String oaNum;

    /**
    * 是否生成回款凭证 关联字典选项
    */
    @BindDict(
    type = "yesNo",
    field = "certed"
    )
    private LabelValue certedLabel;

    /**
    * 是否锁定 关联字典选项
    */
    @BindDict(
    type = "yesNo",
    field = "locked"
    )
    private LabelValue lockedLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
     * 创建人工号 关联信息
     */
    @BindField(
            entity = IamUser.class,
            field = "userNum",
            condition = "this.create_by = id"
    )
    private String userNum;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}